package itheima.com.Test;

import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;

public class Test2 {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入用户名");
        String username = sc.next();
        System.out.println("请输入密码");
        String password = sc.next();

        FileWriter fileWriter = new FileWriter("Day12\\a.txt");

    fileWriter.write(username);
    fileWriter.write("\r\n");
    fileWriter.write(password);

    fileWriter.flush();

    fileWriter.close();
    }
}
